<template>
    <div>
       center
    </div>
</template>
<script>
const auth = {
  isLogin() {
    return true
  }
}
export default {
  // 局部守卫
  beforeRouteEnter (to, from, next) {
    console.log('局部盘查...')
    if (auth.isLogin()) {
      next()
    } else {
      next('/login')
    }
  }
}
</script>
